package com.huadi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huadi.dao.ExpenditureDao;
import com.huadi.entity.Expenditure;
import com.huadi.service.ExpenditureService;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * (Expenditure)表服务实现类
 *
 * @author makejava
 * @since 2023-07-03 15:26:48
 */
@Service("expenditureService")
public class ExpenditureServiceImpl extends ServiceImpl<ExpenditureDao, Expenditure> implements ExpenditureService {
    @Override
    public boolean save(Expenditure expenditure) {
        expenditure.setExpenditureDate(new Date());
        return super.save(expenditure);
    }

    @Override
    public boolean updateById(Expenditure expenditure) {
        expenditure.setExpenditureDate(new Date());
        return super.updateById(expenditure);
    }
}

